package com.exthirteen.textgamescript.service;

import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.time.LocalDateTime;

/**
 * <p>
 * 定时任务
 * </p>
 *
 * @author exthirteen
 * @since 2025/3/7
 */
@Slf4j
@Component
@EnableScheduling
public class SaticScheduleTask {

    @Resource
    private RunService runService;

    @Scheduled(cron = "0 * * * * ?")
    private void checkLicenses() {
        log.info("【定时获取iPad设备列表】 开始:" + LocalDateTime.now());
        runService.updateClient();
    }
}
